package com.leng.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil {
    private static Properties prop=new Properties();
    static {
        InputStream is = PropertiesUtil.class.getClassLoader().getResourceAsStream("data.properties");
        try {
            prop.load(is);
        } catch (IOException e) {
            System.err.println("读取data.properties文件出错！");
            e.printStackTrace();
        }
    }
    public static String get(String key){
        return prop.getProperty(key);
    }
}
